package crypto.util;

import java.security.SecureRandom;

/**
 * 
DOCUMENT ME!
 *
 * @author gato
 */
public class RandomCrypto {
  /**
   * DOCUMENT ME!
   *
   * @param max DOCUMENT ME!
   *
   * @return DOCUMENT ME!
   */
  public static int getRandomInt(int max) {
    SecureRandom random = new SecureRandom();

    int number = random.nextInt(max);

    if (number < 0) {
      return -number;
    }

    return number;
  }
}
